﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Main.Master" Inherits="System.Web.Mvc.ViewPage<Defect_Tracking_System.Models.DefectModel>" %>
<%@ Import Namespace="Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit Defect
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<div id="page-heading"><h1>Edit Defect</h1></div>

<table cellspacing="0" cellpadding="0" border="0" width="100%" id="content-table">
<tbody>
<tr>
	<th class="sized" rowspan="3"><img height="300" width="20" alt="" src="/Content/images/shared/side_shadowleft.jpg"/></th>
	<th class="topleft"></th>
	<td id="tbl-border-top">&nbsp;</td>
	<th class="topright"></th>
	<th class="sized" rowspan="3"><img height="300" width="20" alt="" src="/Content/images/shared/side_shadowright.jpg"/></th>
</tr>
<tr>
	<td id="tbl-border-left"></td>
	<td>
	    <!--  start content-table-inner -->
	    <div id="content-table-inner">
	
	        <table cellspacing="0" cellpadding="0" border="0" width="100%">
	        <tbody>
            <tr valign="top">
	            <td>		
	
                    <!-- start id-form -->
                    <% Html.BeginForm(); %>
                    <% if (ViewData["message"] != null)
                       {%>
                        <div id="message-yellow">
				        <table border="0" width="100%" cellpadding="0" cellspacing="0">
				        <tr>
					        <td class="yellow-left"><%: ViewData["message"] %></td>
					        <td class="yellow-right"><a class="close-yellow"><img src="/Content/images/table/icon_close_yellow.gif" alt=""></a></td>
				        </tr>
				        </table>
				        </div>
                    <% } %>
                    <table cellspacing="0" cellpadding="0" border="0" id="id-form">
                    <tbody>
                    <tr>
                        <th valign="top">Project:</th>
                        <td>
                            <%: Html.HiddenFor(m => m.ProjectId) %>
                            <%: Html.MyTextBoxFor(m => m.ProjectName, m => m.ProjectId) %>
                        </td>
                        <td><%: Html.MyValidationMessageFor(m => m.ProjectId) %></td>
                    </tr>
                    <tr>
                        <th valign="top">Title:</th>
                        <td><%: Html.MyTextBoxFor(m => m.DefectTitle) %></td>
                        <td><%: Html.MyValidationMessageFor(m => m.DefectTitle) %></td>
                    </tr>
                    <tr>
                        <th valign="top">Description:</th>
                        <td><%: Html.MyTextAreaFor(m => m.Description)%></td>
                        <td><%: Html.MyValidationMessageFor(m => m.Description)%></td>
                    </tr>
                    <tr>
                        <th valign="top">Diagnosis: </th>
                        <td><%: Html.MyTextAreaFor(m => m.Diagnosis)%></td>
                        <td><%: Html.MyValidationMessageFor(m => m.Diagnosis)%></td>
                    </tr>
                    <tr>
                        <th valign="top">Originator: </th>
                        <td>
                            <%: Html.HiddenFor(m => m.Originator) %>
                            <%: Html.MyTextBoxFor(m => m.OriginatorName, m => m.Originator) %>
                        </td>
                        <td><%: Html.MyValidationMessageFor(m => m.Originator) %></td>
                    </tr>
                    <tr>
                        <th valign="top">Assign To:</th>
                        <td>
                            <%: Html.HiddenFor(m => m.AssignedMember) %>
                            <%: Html.MyTextBoxFor(m => m.AssignedMemberName, m => m.AssignedMember) %>
                        </td>
                        <td><%: Html.MyValidationMessageFor(m => m.AssignedMember) %></td>
                    </tr>
                    <tr>
                        <th valign="top">Type: </th>
                        <td>
                            <input type="hidden" id="TypeSelected" name="TypeSelected" value="<%: Model.Type %>" />
                            <%: Html.ProjectLookupDropDownList("Type", m => m.Type) %>
                        </td>
                        <td><%: Html.MyValidationMessageFor(m => m.Type) %></td>
                    </tr>
                    <tr>
                        <th valign="top">Version: </th>
                        <td>
                            <input type="hidden" id="VersionSelected" name="VersionSelected" value="<%: Model.Version %>" />
                            <%: Html.ProjectLookupDropDownList("Version", m => m.Version)%>
                        </td>
                        <td><%: Html.MyValidationMessageFor(m => m.Version) %></td>
                    </tr>
                    <tr>
                        <th valign="top">Priority: </th>
                        <td>
                            <input type="hidden" id="PrioritySelected" name="PrioritySelected" value="<%: Model.Priority %>" />
                            <%: Html.ProjectLookupDropDownList("Priority", m => m.Priority)%>
                        </td>
                        <td><%: Html.MyValidationMessageFor(m => m.Priority) %></td>            
                    </tr>
                    <tr>
                        <th valign="top">Status: </th>
                        <td>
                            <input type="hidden" id="StatusSelected" name="StatusSelected" value="<%: Model.Status %>" />
                            <%: Html.ProjectLookupDropDownList("Status", m => m.Status)%>
                        </td>
                        <td><%: Html.MyValidationMessageFor(m => m.Status)%></td>            
                    </tr>
                    <tr>
                        <th>&nbsp;</th>
                        <td valign="top">
                            <input type="submit" class="form-submit" value=""/>
                            <a href="<%=ViewData["ReturnUrl"]%>" class="button2">Back</a>
                        </td>
                        <td></td>
                    </tr>
                    </tbody>
                    </table>
                    <% Html.EndForm(); %>
                    <!-- end id-form  -->

	            </td>
            </tr>
            <tr>
                <td>            
                    <img height="1" width="695" alt="blank" src="/Content/images/shared/blank.gif"/>
                </td>
                <td>
                </td>
            </tr>
            </tbody>
            </table>
            <div class="clear"></div>

        </div>
        <!--  end content-table-inner  -->
    </td>
    <td id="tbl-border-right"></td>
</tr>
<tr>
	<th class="sized bottomleft"></th>
	<td id="tbl-border-bottom">&nbsp;</td>
	<th class="sized bottomright"></th>
</tr>
</tbody>
</table>
<div class="clear">&nbsp;</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Fotter" runat="server">
<img id="loading" src="/Content/images/shared/loading51.gif" width="100" height="100" style="z-index: 3333; display: none; position:absolute" />
<script src="/Scripts/CreateDefect.js" type="text/javascript"></script>
<script type="text/javascript">
    tinyMCE.init({
        // General options
        mode: "exact",
        elements: "Description",
        theme: "advanced",
        plugins: "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",

        // Theme options
        theme_advanced_buttons1: "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
        theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        theme_advanced_buttons4: "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
        theme_advanced_toolbar_location: "top",
        theme_advanced_toolbar_align: "left",
        theme_advanced_statusbar_location: "bottom",
        theme_advanced_resizing: true,

        // Example content CSS (should be your site CSS)
        content_css: "css/content.css",

        // Style formats
        style_formats: [
			{ title: 'Bold text', inline: 'b' },
			{ title: 'Red text', inline: 'span', styles: { color: '#ff0000'} },
			{ title: 'Red header', block: 'h1', styles: { color: '#ff0000'} },
			{ title: 'Example 1', inline: 'span', classes: 'example1' },
			{ title: 'Example 2', inline: 'span', classes: 'example2' },
			{ title: 'Table styles' },
			{ title: 'Table row 1', selector: 'tr', classes: 'tablerow1' }
		],

        width: "700",
        height: "350"
    });
</script>
</asp:Content>
